package com.xiaobai.data.manager.system.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaobai.data.manager.system.UserRoleManager;
import com.xiaobai.data.mapper.system.UserRoleMapper;
import com.xiaobai.model.entity.system.UserRole;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class UserRoleManagerImpl extends ServiceImpl<UserRoleMapper, UserRole>
    implements UserRoleManager {
    @Override
    public boolean deleteRoleIds(List<Long> ids) {
        return this.remove(new LambdaQueryWrapper<UserRole>().in(UserRole::getRoleId, ids));
    }
}
